package com.zhaoyu.wemedia;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.annotation.ComponentScan;

@SpringBootApplication
@MapperScan("com.zhaoyu.wemedia.mapper") // 扫描mapper
@ComponentScan(basePackages = {"com.zhaoyu.wemedia"}) // 扫描zhaoyu-leadnews-wemedia模块包下的所有类
@ComponentScan(basePackages = {"com.zhaoyu.apis"}) // 扫描zhaoyu-leadnews-apis模块包下的所有类
@ComponentScan(basePackages = {"com.zhaoyu.model"}) // 扫描zhaoyu-leadnews-model模块包下的所有类
@ComponentScan(basePackages = {"com.zhaoyu.common"}) // 扫描zhaoyu-leadnews-common模块包下的所有类
@ComponentScan(basePackages = {"com.zhaoyu.utils"}) // 扫描zhaoyu-leadnews-utils模块包下的所有类
//@ComponentScan(basePackages = {"com.zhaoyu.seata"}) // 扫描zhaoyu-leadnews-seata模块包下的所有类
@EnableDiscoveryClient // 开启注册中心的注解
@ServletComponentScan // 在SpringBootApplication上使用@ServletComponentScan注解后,Servlet、Filter、Listener可以直接通过@WebServlet、@WebFilter、@WebListener注解自动注册,无需其他代码
public class WemediaApplication {

    public static void main(String[] args) {
        SpringApplication.run(WemediaApplication.class,args);
    }

}